home *** CD-ROM | disk | FTP | other *** search
- #include "MySCAPIApp.h"
- #include "SCAPIMessageBox.h"
-
-
- // Constructor
-
- MySCAPIApp::MySCAPIApp(int* argcP, char*** argvP) : SCAPIApp(argcP, argvP)
- {
- try
- {
- mDefaultMenuBarP = (MySCAPIDefaultMenuBar*) new MySCAPIDefaultMenuBar();
- AssociateMenuBar(mDefaultMenuBarP);
-
- mWinP = (MySCAPIWindow*) new MySCAPIWindow( this,
- "Window 1",
- SCAPIWindow_default_originx,
- SCAPIWindow_default_originy,
- 400,
- 300 );
-
- mWinP2 = (MySCAPIWindow2*) new MySCAPIWindow2( this,
- "Window 2",
- SCAPIWindow_default_originx +
- 400 +
- SCAPIWindow_borders_width );
-
- mWinP3 = (MySCAPIWindow3*) new MySCAPIWindow3( this,
- "Window 3",
- SCAPIWindow_default_originx,
- SCAPIWindow_default_originy +
- 300 +
- SCAPIWindow_borders_height );
- }
- catch (SCAPIError& theError)
- {
- // This try-catch bloc is really necessary; as all the exceptions are
- // re-thrown, there must be a catcher somewhere, otherwise the
- // application simply exits. That's not a nice behaviour for an application.
-
- SCAPIMessageBox::Alert(theError.mMessage);
- }
- }
-
- // Member functions
-
- void MySCAPIApp::ExecuteCommand(int inCommand)
- {
-
- }
-
- void MySCAPIApp::CommandStatus( int inCommand,
- bool &outEnabled,
- int &outMark,
- char* outName )
- {
- switch (inCommand)
- {
- case 1000:
- outMark = SCAPI_check_mark;
- break;
-
- case 1011:
- outMark = SCAPI_check_mark;
- break;
- }
- }
-